<div class="container">
  <h1>form_button()</h1>
  <p class="signature">function form_button(string $name, ?string $value = null, ?array $attributes = null): string</p>
  
  <h2>Description</h2>
  <div class="description">
    <p>Generates an HTML button element.</p>
  </div>
  
  <h2>Parameters</h2>
  <table>
    <thead>
      <tr>
        <th>Parameter</th>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>$name</td>
        <td>string</td>
        <td>The name attribute for the button element.</td>
      </tr>
      <tr>
        <td>$value</td>
        <td>string|null</td>
        <td>(optional) The value of the button. If not provided, defaults to "Submit". Default is null.</td>
      </tr>
      <tr>
        <td>$attributes</td>
        <td>array|null</td>
        <td>(optional) An associative array of HTML attributes for the button. Default is null.</td>
      </tr>
    </tbody>
  </table>
  
  <h2>Return Value</h2>
  <table>
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>string</td>
        <td>The generated HTML button element.</td>
      </tr>
    </tbody>
  </table>
  
  <h2>Example #1</h2>
  <p>The code sample below demonstrates the basic usage of the <code>form_button</code> function with default parameters.</p>
  <pre>
$name = 'action-btn';
echo form_button($name);
// Output:
// &lt;button type="button" name="action-btn"&gt;Submit&lt;/button&gt;
  </pre>
  
  <h2>Example #2</h2>
  <p>The code sample below demonstrates a more complex usage of the <code>form_button</code> function with a custom value and additional attributes.</p>
  <pre>
$name = 'action-btn';
$value = 'Click Me';
$attributes = [
    'class' => 'btn btn-primary', 
    'id' => 'custom-button', 
    'onclick' => 'handleClick()',
    'data-toggle' => 'dropdown'
];
echo form_button($name, $value, $attributes);
// Output:
// &lt;button type="button" name="action-btn" class="btn btn-primary" id="custom-button" onclick="handleClick()" data-toggle="dropdown"&gt;Click Me&lt;/button&gt;
  </pre>
  
  <h2>Notes</h2>
  <ul>
    <li>The function automatically sets the <code>type</code> attribute to "button".</li>
    <li>If no <code>$value</code> is provided, the function uses "Submit" as the default button text.</li>
    <li>The button's text content is not escaped, so ensure proper sanitization if using user-generated content.</li>
    <li>The <code>$attributes</code> array can be used to add any valid HTML attributes to the button element.</li>
    <li>For custom data attributes or non-standard HTML attributes, include them in the <code>$attributes</code> array (e.g., <code>['data-toggle' => 'dropdown']</code>).</li>
  </ul>
</div>